<?php
/**
 * Created by PhpStorm.
 * Author: 芸签cms www.yunqiancms.com
 * User: sun
 * Date: 2022/8/4
 * Time: 5:23 PM
 */
namespace app\frontend\modules\site\controllers;

use app\common\models\Theme;
use app\frontend\controllers\BaseController;
use app\frontend\modules\site\services\SiteBaseService;


class SiteBaseController extends BaseController
{
    protected $clientType;//访问终端类型：PC、H5
    public function __construct()
    {
        parent::__construct();
        $siteBaseService = new SiteBaseService();
        //收否是手机端
        $isMobile = $siteBaseService->isMobile();
        if($isMobile){
            $this->clientType = Theme::TYPE_H5;
        }else{
            $this->clientType = Theme::TYPE_PC;
        }
    }
}